package com.walleipt.demo.ioc.orderComparator;

import java.util.List;

import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MainTestBeanPostProcessorPriority {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		/**
		 * alt+shift+l 生成名称
		 * shift+enter 换行
		 * ctrl+t 查看接口的实现类
		 * ctrl+1
		 */
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
		
		System.out.println("====================打印BeanPostProcessor的顺序=================================");
		List<BeanPostProcessor> beanPostProcessors = ((DefaultListableBeanFactory)applicationContext.getBeanFactory()).getBeanPostProcessors();
		for (BeanPostProcessor beanPostProcessor : beanPostProcessors) {
			System.err.println(beanPostProcessor.getClass());
		}
		applicationContext.close() ;
	}

}
